<?php
include "sql.php";
$arr=$_POST;

if($arr['campus']=='五山校区')
	$type+=10;
else if($arr['campus']=='大学城校区')
    $type+=20;
if($arr['type']=='校园环境')
    $type+=1;
else if($arr['type']=='学生生活')
    $type+=2;
else if($arr['type']=='后勤服务')  
    $type+=3;
else if($arr['type']=='饭堂意见')  
    $type+=4;
    
$sql="select max(ID) as maxid from proposal_main";
$result=SQL_query($sql);
$row=mysql_fetch_array($result);
$maxID=$row[0];

$sql='insert into proposal_main (ID,name,phone,qq,title,content,type,time) values ('.($maxID+1).',"'.$arr['name'].'","'.$arr['phone'].'","'.$arr['qq'].'","'.$arr['title'].'","'.$arr['content'].'","'.$type.'",'.time().')';
SQL_query($sql);
?>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
		<link rel="stylesheet" type="text/css" href="../css/stylesheet.css">
		<title>华工权小益提案收集平台</title>
	</head>
	<body>
		<div class="header">
			<a href="../index.html"><img src="../img/newhead.jpg"></a>
		</div>
		<div class="clear"></div>
		<div class="raise">
            <span style="color:#ffffff;"><?php echo '<br>发布成功啦~点击平台下方菜单“提案平台”→“提案汇总“可查看提案跟进进度。'?></span>
		</div>
		<div class="clear"></div>
		<div class="wholecori">
			<div class="copyright">
				<span>Copyright © 2017 华南理工大学学生会权益部</span>
			</div>
			<div class="copyright">
				<span>Power by 无线电爱好者协会信息部</span>
			</div>
		</div>
		<div class="clear"></div>
	</body>
</html>
